Putting a Conditional Sub-report on a Letter

Description

The following example shows how to put a sub-report, which containing variable content, on a letter only when specific conditions are met. The first step is to define the sub-report, which in this case is named "foursomes". This sub-report displays the data from the table FOURSOMES, which is sorted by the foursome field. The result is the firstname and lastname fields from the records that have the same foursome value.

images/letter_with_subreport.gif

The letter design has two RTF objects above and below the sub-report, which is placed on a conditional object.

images/letter_design_with_conditional_content.gif

The conditional object has two conditions, which must be true before the sub-report appears.

images/letter_conditional_object.gif

The result is a letter similar to the one below.

images/letter_with_conditional_content.gif